<?php
/*********************************************************************************
* Filename: reset_password.php
* 
* This PHP script updates a password for the provided team in the given league
*
*
* Author: Caleb Goff
* Date Created: 10/10/2009
**********************************************************************************/

//Include common.php to utilize common functions
include_once 'common.php';
require_once "Mail.php";
//Retrieve variables from HTTP POST
$league_id      = $_REQUEST['leagueId'];
$team_id        = $_REQUEST['teamId'];
$pass           = $_REQUEST['teamPwd'];

$retVal = 0;

// Query the database to update the team password
$query = "UPDATE TEAMS SET TEAM_PWD = '$pass' WHERE TEAM_ID = '$team_id' AND LEAGUE_ID = '$league_id'";
$result = do_query($query, $g_db_name, $g_username);

echo 0;

?>

